/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#pragma once

#include "A_引擎/引擎.h"
#include "A_引擎/文件工程/工程文件.h"



enum E_组件类型 : uint8 {
	e_屏幕,
	e_工作区,

	e_3D视口页面,
	e_时间轴页面,
	e_节点视口页面,
	e_文本编辑视口页面,
};

typedef struct {
	E_方向	m_方向;
	bvec2	m_是否延展;
}S_屏幕UI结构;

typedef struct {
	E_方向	m_方向;
	bvec2	m_是否延展;
}S_工作区UI结构;

typedef struct {
	E_方向	m_方向;
	bvec2	m_是否延展;
}S_工作区页面UI结构;

struct S_组件构建 : public S_界面框架构建 {
	E_组件类型	m_类型;
	void*		m_UI结构;

	std::vector<S_组件构建*> m_子组件结构;

	S_组件构建();
	void					f_保存UI结构(FILE* f, const std::vector<C_Widget*>& ws);
	std::vector<C_Widget*>	f_加载UI结构(FILE* f, S_UI创建环境& ctx);

	void f_保存界面框架(FILE* f);
	void f_加载界面框架(FILE* f);
	void f_构建默认界面(FILE* f, C_Widget* root);

};




C_菜单* f_界面构建_主菜单创建(S_UI创建环境& ctx);

